﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using internal_website.Meta;
using internal_website.Models.Resources;

namespace internal_website.Models
{
    public class Event : IEvent
    {
        #region Constructor

        public Event()
        {
            EventCompositions = new Collection<EventComposition>();
            Users = new Collection<User>();
        }

        #endregion

        [Key]
        public int Id { get; set; }
        public bool Active { get; set; }


        /*        #region Localized display and model validation attributes
        [Display(Name = "Event_Name_Display_Name", Prompt = "Event_Name_Display_Prompt", ResourceType = typeof(ValidationStrings))]
        [Required(ErrorMessageResourceName = "Event_Name_Required", ErrorMessageResourceType = typeof(ValidationStrings))]
        [LocalizedRegex("_Name_LocalizedRegex_Pattern", "Event_Name_LocalizedRegex_ErrorMessage", errorMessageResourceType: typeof(ValidationStrings))]
        #endregion
        */public string Name { get; set; }

        /*        #region Localized display and model validation attributes
        [Display(Name = "Event_Description_Display_Name", Prompt = "Event_Description_Display_Prompt", ResourceType = typeof(ValidationStrings))]
        [Required(ErrorMessageResourceName = "Event_Description_Required", ErrorMessageResourceType = typeof(ValidationStrings))]
        [LocalizedRegex("_Description_LocalizedRegex_Pattern", "Event_Description_LocalizedRegex_ErrorMessage", errorMessageResourceType: typeof(ValidationStrings))]
        #endregion
        */public string Description { get; set; }

        /*        #region Localized display and model validation attributes
        [Display(Name = "Event_StartDate_Display_Name", Prompt = "Event_StartDate_Display_Prompt", ResourceType = typeof(ValidationStrings))]
        [Required(ErrorMessageResourceName = "Event_StartDate_Required", ErrorMessageResourceType = typeof(ValidationStrings))]
        [LocalizedRegex("_Date_LocalizedRegex_Pattern", "Event_StartDate_LocalizedRegex_ErrorMessage", errorMessageResourceType: typeof(ValidationStrings))]
        #endregion
        */public DateTime StartDate { get; set; }

        /*        #region Localized display and model validation attributes
        [Display(Name = "Event_EndDate_Display_Name", Prompt = "Event_EndDate_Display_Prompt", ResourceType = typeof(ValidationStrings))]
        [Required(ErrorMessageResourceName = "Event_EndDate_Required", ErrorMessageResourceType = typeof(ValidationStrings))]
        [LocalizedRegex("_Date_LocalizedRegex_Pattern", "Event_EndDate_LocalizedRegex_ErrorMessage", errorMessageResourceType: typeof(ValidationStrings))]
        #endregion
        */
          public DateTime EndDate { get; set; }

        #region Navigation properties

        public virtual ICollection<EventComposition> EventCompositions { get; set; }

        public virtual Calendar Calendar { get; set; }
        public virtual EventType EventType { get; set; }
        public virtual Location Location { get; set; }

        public virtual ICollection<User> Users { get; set; }

        #endregion
    }
}